---
title: "Lesson Book Pipeline"
type: concept
created: 2026-04-18
updated: 2026-04-18
sources: ["raw/notes/memory.md", "raw/articles/00-overview.md"]
tags: [curriculum-mapper, lesson-books, pipeline, learner-bot, adaptive-content]
---

# Lesson Book Pipeline

The Lesson Book Pipeline converts a curriculum objective into a personalized, level-appropriate non-fiction book for each child. It is a **three-step sequential pipeline** — each step depends on the previous one being complete and approved.

⚠️ **Non-Negotiable (Sig Dug, 2026-04-05):** The three steps are non-negotiable and cannot be collapsed. You cannot personalize garbage. Step 3 only works if Step 2 is teacher-approved.

## The Three Steps

```mermaid
flowchart LR
    CM["Step 1\nCurriculum Mapper\nExtracts objective\n(what to teach)"]
    GL["Step 2\nGeneral Lesson Book\nAI generates canonical\nresearch-backed version\n→ Teacher reviews\n→ Teacher approves"]
    PB["Step 3\nPersonalized Book\nLearner Bot personalizes\nfor each child\n(level, interests, vocab gaps)"]
    CM --> GL --> PB
    style GL fill:#fff3cd
    style PB fill:#d4edda
```

### Step 1: Curriculum Mapping ✅

The [[Curriculum Mapper]] maps curriculum documents for a territory, extracting structured objectives. This step is complete for Turkey and England.

**Output:** A structured `curriculum_objective` record with: subject, year level, description, vocabulary list, story potential score.

### Step 2: General Lesson Book Generation

The system generates a **canonical, general lesson book** for the objective. This is NOT personalized — it is the research-backed, pedagogically sound version of how to teach this topic to a child of this year level.

**Prompt grounding:** The generation prompt must be grounded in children's non-fiction pedagogy — not just a sensible page list. The book must reflect how educational experts recommend teaching this concept.

**Teacher review is mandatory:** The general lesson book enters `Teacher Review` status and cannot be served to children until a teacher marks it `Approved`. Teachers can edit, reject, or approve.

**Why this step exists:** Personalization in Step 3 can only improve good source material. An AI-generated lesson book that wasn't reviewed can contain errors, bias, or pedagogically unsound content. Teacher approval is the quality gate.

**Status flow:**
```
Draft → Teacher Review → Approved → Published
```

### Step 3: Personalization via Learner Bot

Once a general lesson book is approved, the [[Learner Bot]] personalizes it for each assigned child. Personalization considers:

- Child's FK reading level (via [[Adaptive Engine]])
- Child's interest tags (from onboarding)
- Child's vocabulary gaps (from word tap telemetry)
- Child's curriculum state (which objectives are in progress)

The personalized version is generated on demand (first assignment or first access) and cached per `(book_id, learner_id)`.

## Book Structure

Every lesson book follows a fixed template — this structure is non-negotiable:

| Section | Purpose |
|---|---|
| **Cover** | Title, Pip mascot, topic image |
| **Learning Goal** | "By the end of this book, you will know..." (child-facing) |
| **Key Words** | 5–8 vocabulary words with definitions |
| **Content Spreads (3–5)** | Main content pages — text + image prompts |
| **Did You Know?** | Interesting fact related to topic |
| **Real World Connection** | How this topic applies to the child's life |
| **Recap** | Summary of key points |
| **Reflect** | Simple self-assessment question |
| **Teacher Layer** | Curriculum link, suggested activities, assessment ideas (teacher-only) |

**Data representation:** Each section is data, not a rendered page. The field `bodyText` feeds to Text AI for rendering, `imagePrompt` feeds to Image AI, `voiceoverScript` feeds to TTS, `vocabulary` feeds app-level tap-to-define. The "Vocabulary" section is never shown as a standalone page to the child — it drives interactivity.

## Cross-Grade Objectives

Some curriculum objectives span multiple year levels (e.g., "develop reading comprehension" applies to Grades 1–8). These are NOT handled by a single book.

⚠️ **Non-Negotiable (Sig Dug, 2026-04-09):** Cross-grade objectives require **one book per grade level**, each covering the same skill at the appropriate difficulty:

- Grade 1: simple sentences, big pictures, ~50 words
- Grade 3: short paragraphs, some complexity, ~200 words  
- Grade 6: longer text, inference required, ~500 words

The [[Adaptive Engine]] FK leveling handles this — same objective, same topic, re-leveled per grade. This is why per-year book counts in CM will be higher than the total unique objective count.

**Current status of cross-grade books (2026-04-18):**
- ✅ CM has extracted and structured all objectives
- ❌ `curriculum_mappings` table is empty — no books mapped to objectives yet
- ❌ Grade-leveled books not yet generated for cross-grade objectives
- ❌ `grade_level_min/max` not populated on books in `content_meta` DB

## Platform Spaces

Pickatale operates two distinct reading spaces:

| Space | Content | Who assigns | FK leveling |
|---|---|---|---|
| **Library** | Fiction, child reads freely | Child selects (recommendations) | Per child level |
| **Lesson Books** | Curriculum non-fiction, teacher-assigned | Teacher assigns | General version + personalized |

The Lesson Books space is NEW (not yet built end-to-end). The Library is the existing Pickatale product.

## Build Order for Lesson Books

1. ✅ CM objective extraction (Step 1)
2. ✅ Lesson book generator in CM (Step 2 generation)
3. ⬜ Teacher review/approve UI in CM
4. ⬜ Lesson book assignment flow (Teacher Portal → Class)
5. ⬜ Student lesson book tab in Reader App

## Related Pages

- [[concepts/curriculum-mapper/index|Curriculum Mapper]] — overview
- [[concepts/curriculum-mapper/Extraction Workers]] — how objectives are extracted
- [[entities/Curriculum Mapper]] — service entity page
- [[concepts/learner-bot/index|Learner Bot]] — Step 3 personalization engine
- [[concepts/adaptive-content/index|Adaptive Content Engine]] — FK leveling applied to lesson books
